function calculate() {

  var input1 = parseFloat(document.getElementById("input1").value);   //m1
  var input2 = parseFloat(document.getElementById("input2").value);   //m2
  var input3 = parseFloat(document.getElementById("input3").value);  //D
  // var input4 = parseFloat(document.getElementById("input4").value);  //θ
  //console.log("input1", input1);

  if (!input1) {
    input1 = 0;
  }
  if (!input2) {
    input2 = 0;
  }
  if (!input3) {
    input3 = 0;
  }
  //if (!input4) { 
  //   input4 = 0;
  // }

  var result = ((1 + input1 / input2) / (1 + input1 / 1950) * (150 * input3 + 12)).toFixed(2);

  if (result == 'NaN') {
    result = 0
    alert('请按要求输入数据！')
    location.reload()
  }

  document.getElementById("result").textContent = result;
}